/*
 * @Author: 徐建辰
 * @Date: 2021-11-04 14:58:42
 * @LastEditTime: 2021-11-04 15:01:54
 * @LastEditors: Please set LastEditors
 * @Description: 日期处理工具函数
 */
export function formatTime(timeStamp = Date.now()) {
  const target = new Date(timeStamp)
  // 把时、分、秒、毫秒的部分变成0
  target.setHours(0)
  target.setMinutes(0)
  target.setSeconds(0)
  target.setMilliseconds(0)

  return target.getTime()
}
